import { http } from "@/utils/http"
import { CommonResponse } from "./common"


/**
 * 成绩分页参数
 */
export type ProductListParams = {
  pageNum: number
  pageSize: number
  userPhone?: string
}

/**
 * 成绩列表数据
 */
export type ProductResultData = {
  total: number
  pageNum: number
  pageSize: number
  records: {
    serialNo: number
    paperName: string
    userPhone: string
    score: number
    accuracy: number
    examCount: number
    gmtModified: string
  }[]
}

// 查询成绩分页
export const getScoreList = (data: ProductListParams) => {
  return http.request<CommonResponse<ProductResultData>>("post", "/api/platform/records/page", { data })
}